/**
 * *****************************************************************
 * @file    spi_acquisition.h
 * @author  Home
 * @version 1.0.0
 * @date    2020-11-24
 * @brief   
 *                 Copyright (c) 2020, Andar Technologies Inc.
 *                           www.andartechs.com 
 *
 * *****************************************************************
 */
#ifndef __SPI_ACQUSITION_H
#define __SPI_ACQUSITION_H


/*------------------------------ include -------------------------------------*/
#include "adt3102_type_define.h"
#include "spi_ctype_map.h"
#include "fft.h"

/*------------------------------ function ------------------------------------*/
/**
 * @brief   dataAcquisitonSpiInit.
 * @param   SpiX: SPI0/SPI1.
 * @param   spiMode: .
 * @return  None.
 * @note
 */
void dataAcquisitonSpiInit(SPI_TypeDef *SpiX, uint8 spiMode);

/**
 * @brief   spi Data Acquisiton.
 * @param   SpiX: SPI0.
 * @param   pbuf: wirte data buf.
 * @param   len:  data length.
 * @param   chirpNum:  number of chirp.
 * @return  None.
 * @note
 */
void spiDataAcquisiton(uint16 type, uint8 *pbuf, uint32 len, uint32 chirpNum);

/**
 * @brief   Send data single.
 * @param   dspMemoryStgrTypedef.
 *          See the @dspMemoryStgrTypedef member for details.
 * @return  None.
 * @note
 */
void SendDataSingle(dspMemoryStgrTypedef *memory, uint32 chirpNum);

/**
 * @brief   Send data single.
 * @param   dspMemoryStgrTypedef.
 *          See the @dspMemoryStgrTypedef member for details.
 * @return  None.
 * @note
 */
void SendDataCont(dspMemoryStgrTypedef *memory);
#endif
